﻿using System.Web.Mvc;
using iHouse.Common.Helper;
using iHouse.Model.Data;

namespace iHouse.Web.Infrastructure
{
    public class BookFormView
    {
        public Book Book { get; set; }

        public SelectList Categories { get; set; }

        public SelectList BookTypes
        {
            get
            {
                return new SelectList(EnumHelper.ConvertEnumToList(typeof(BookType)), "Key", "Value", Book.Type);
            }
        }

        public SelectList Languages
        {
            get
            {
                return new SelectList(EnumHelper.ConvertEnumToList(typeof(LanguageType)), "Key", "Value", Book.Language);
            }
        }

        public SelectList Publishers { get; set; }
    }
}